<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="app" uri="/application" %>
<%@ taglib  prefix="s"  uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="/css/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="all_main">
  <div class="head_main">
    <div class="main_nav">日常信息管理-&gt;热推列表</div>
    <div class="main_soso">
    <form action="/daily/search_hot_push.shtml">
    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
		    <td width="19" height="30" align="center"><img src="../images/clean_011.gif" width="16" height="16" /></td>
		    <td>
		      热推类型:<select name="push.pushType">
		           <option value="">请选择...</option>
		           <app:cons_select code="003" value="${push.pushType}"></app:cons_select>
		          </select>&nbsp;
		       标题：
		      <input name="push.pushName" type="text" value="${push.pushName}" style="width:80px;" class="inputwidth01"  maxlength="30" />&nbsp;&nbsp;
		      </td>
		    <td align="left">
		      <input name="input7" type="submit" class="input01" value="搜索" /></td>
		  </tr>
		</table>
    </form>
    </div>
    <div class="main_title">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <th width="8%">编号</th>
          <th width="20%">标题</th>
          <th width="10%">热推类型</th>
          <th width="20%">图片</th>
          <th width="10%">是否显示</th>
          <th width="30%" style="text-align: left;">操作</th>
          <th></th>
        </tr>
      </table>
    </div>
  </div>
  <div class="content_main">
    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="background_hegh01">
      <c:forEach items="${page_list.list}" var="o">
	       <tr>
	          <td width="8%">${o.id}</td>
	          <td width="20%">${o.pushName}  </td>
	          <td width="10%"><app:code_name code="${o.pushType}"></app:code_name>   </td>
	          <td width="20%"><app:image cssText="max-width:200px;max-height:60px;" src="${o.imgPath}"></app:image></td>
	          <td width="10%" > 
		          <select onchange="xhr_change('${o.id}',this)">
	                <option value="1" <c:if test="${o.state=='1'}">selected="selected"</c:if>>显示</option>
	                <option value="0" <c:if test="${o.state=='0'}">selected="selected"</c:if>>不显示</option>
	             </select>
		          
	          </td>
	          <td width="30%" style="text-align: left;">
	             <a href="/daily/hot_push_detail,${o.pushType}.shtml?id=${o.id}">详情</a>

	          </td>
	          <td></td>
	       </tr>
      </c:forEach>
    </table>
  </div>
  
  <app:page></app:page>
  
  
</div>
<div id="boxId" style="position: absolute;background: red;display:none;"><span style="color:#fff;">请稍候...</span></div>
</body>
</html>
<script type="text/javascript" src="/scripts/util.js"></script>
<script type="text/javascript" src="/scripts/xhr.js"></script>
<script type="text/javascript">


	function winOpen(flash,title){
	    var wininfo = "width=520,height=580,resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,left=20";
	    var pop_win = window.open("","nw",wininfo);
	    pop_win.resizeTo(520,580);
	    pop_win.document.writeln('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
	    pop_win.document.writeln('<html xmlns="http://www.w3.org/1999/xhtml">');
	    pop_win.document.writeln('<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>视频播放--'+(title||'')+'</title><style type="text/css">');
	    pop_win.document.writeln('* { margin:0px; padding:0px} </style></head>');
	    pop_win.document.writeln('<body>'+flash+'</body>');
	    pop_win.document.close();
    }
	function xhr_change(id,th){
		
		function cb(d){
			util.close_dusk("boxId");
		}
		new xhr('/daily/update_hot_push_state.shtml',cb).setParameter('id',id).setParameter("state",th.value).execute();
		util.dusk_div("boxId");
	}
	
</script>